<template>
    <div class="add-container">
      <div class="heard">
        <div class="avatar">
          <img src="../assets/touxiang.jpg" alt="">
          <div class="avatar--text">
            <router-link to="/auth/login" class="login">{{msg}}</router-link>
          </div>
        </div>
      </div>
      <div class="break"></div>
      <div class="indent">
        <ul>
          <li>
            <span class="iconfont icon-daifukuan ico"></span><br>
            <span class="indent--text">待付款</span>
          </li>
          <li>
            <span class="iconfont icon-daishouhuo ico"></span><br>
            <span class="indent--text">待收货</span>
          </li>
          <li>
            <span class="iconfont icon-shouhoufuwu ico"></span><br>
            <span class="indent--text">售后/退换货</span>
          </li>
          <li>
            <span class="iconfont icon-dingdan ico"></span><br>
            <span class="indent--text">所有订单</span>
          </li>
        </ul>
      </div>
      <div class="break--two"></div>
      <div class="personal">
        <ul>
          <li class="li">
            <span class="iconfont icon-qianbao icon qianbao"></span>
            <span class="li--text">商城分期订单</span>
            <span class="right"><span>待还0.0元  </span><img src="../assets/go.png" class="go"></span>
          </li>
          <li class="li">
            <span class="iconfont icon-yinxingqia icon yinxingqia"></span>
            <span class="li--text">我的银行卡</span>
            <span class="right"><img src="../assets/go.png" class="yinxingqia--go"></span>
          </li>
          <li class="li" @click="addRess">
            <span class="iconfont icon-shouhuodizhi icon shouhuodizhi"></span>
            <span class="li--text">收货地址</span>
            <span class="right"><img src="../assets/go.png" class="shouhuodizhi--go"></span>
          </li>
          <li class="li">
            <span class="iconfont icon-youhuiquan icon youhuiquan"></span>
            <span class="li--text">优惠券</span>
            <span class="right"><img src="../assets/go.png" class="youhuiquan--go"></span>
          </li>
        </ul>
      </div>
      <div class="break--two"></div>
      <div class="assist">
        <ul>
          <li class="li">
            <span class="iconfont icon-duanxin icon qianbao"></span>
            <span class="li--text">我要反馈</span>
            <span class="right"><img src="../assets/go.png" class="duanxin--go"></span>
          </li>
          <li class="li">
            <span class="iconfont icon-shezhi icon yinxingqia"></span>
            <span class="li--text">设置</span>
            <span class="right"><img src="../assets/go.png" class="shezhi--go"></span>
          </li>
          <li class="li">
            <span class="iconfont icon-bangzhuzhongxin icon shouhuodizhi"></span>
            <span class="li--text">帮助中心</span>
            <span class="right"><img src="../assets/go.png" class="bangzhuzhongxin--go"></span>
          </li>
        </ul>
      </div>
      <div class="break--three"></div>
    </div>
</template>

<script>
import '../dome/iconfont.css'
export default {
  name: "home",
  data() {
    return {
      msg: '立即登录',
      address:[]
    }
  },
  created() {
    this.msg = localStorage.getItem('phoneNumber').slice(0, 3) + '****' + localStorage.getItem('phoneNumber').slice(7);
    console.log(this.msg);
    this.address = this.$route.params.userInfo;
  },
  methods: {
    addRess(){
      if (this.msg) {
        this.$router.push({name:'addRess'});
      }else {
        this.$toast({
          message: "请先登录账号",
          duration: 1000,
        })
      }
    }
  },

}
</script>

<style scoped>
  *{
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
  }
  .add-container{
    width: 100vw;
    height: 100vh;
  }
  .heard{
    width: 100vw;
    height: 4.1466rem;
    position: relative;
    background-image: url("../assets/home.png");
    background-size: 100vw 4.1466rem;
  }
  .login{
    color: white;
  }
  .break{
    width: 100vw;
    height: .24rem;
    background: #f6f6f6;
  }
  .avatar{
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    position: relative;
    top: 1.5866rem;
    left: 1.08rem;
  }
  .avatar>img{
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
  }
  .avatar--text{
    width: 3.5rem;
    height: 1rem;
    background: royalblue;
    border-radius: .5rem;
    font-size: .35rem;
    color: white;
    text-align: center;
    line-height: 1rem;
    position: relative;
    left: 2.7rem;
    top: -1.5rem;
  }
  .indent{
    width: 100vw;
    height: 2.01rem;
  }
  .break--two{
    width: 100vw;
    height: .15rem;
    background: #f6f6f6;
  }
  .indent>ul>li{
    float: left;
    width: 2.5rem;
    text-align: center;
  }
  .ico{
    font-size: .7rem;
    display: inline-block;
    position: relative;
    top: .2933rem;
    width: 2.5rem;
    color: #666;
  }
  .indent--text{
    width: 2.5rem;
    display: inline-block;
    position: relative;
    font-size: .363rem;
    color: #333;
    top: .6rem;
  }
  .personal{
    width: 100vw;
    height: 4.68rem;
  }
  .personal>ul>li{
    width: 100vw;
    height: 1.2rem;
  }
  .icon{
    font-size: .4266rem;
    line-height: 1.2rem;
    position: relative;
    left: .48rem;
  }
  .qianbao{
     color: #f35066;
   }
  .yinxingqia{
    color: #2979e5;
  }
  .shouhuodizhi{
    color: #feb041;
  }
  .youhuiquan{
    color: #ef7fad;
  }
  .li--text{
    color: #939393;
    position: relative;
    display: inline-block;
    left: .8rem;
    line-height: 1.2rem;
    font-size: .38rem;
  }
  .go{
    position: relative;
    height: .4rem;
  }
  .right{
    position: relative;
    left: 4.8rem;
    vertical-align: middle;
    font-size: .36rem;
    color: #a4a4a4;
  }
  .right>span{
    position: relative;
    top: -.05rem;
  }
  .yinxingqia--go{
    left: 2.05rem;
    position: relative;
    height: .4rem;
  }
  .shouhuodizhi--go{
    left: 2.38rem;
    position: relative;
    height: .4rem;
  }
  .youhuiquan--go{
    left: 2.73rem;
    position: relative;
    height: .4rem;
  }
  .assist{
    width: 100vw;
    height: 3.546rem;
  }
  .shezhi--go{
    left: 3.1rem;
    position: relative;
    height: .4rem;
  }
  .duanxin--go{
    left: 2.35rem;
    position: relative;
    height: .4rem;
  }
  .bangzhuzhongxin--go{
    position: relative;
    height: .4rem;
    left: 2.32rem;
  }
  .break--three{
    width: 100vw;
    height: 1.2rem;
    background: #f6f6f6;
  }
</style>
